<?php
/**
 * Created By PhpStorm
 * Author: patrick wu
 * Date: 2021/1/19
 * Time: 9:49
 */
namespace App\Http\Model\Mysql;

use Illuminate\Database\Eloquent\Model;

class LimitDiscountModel extends Model
{
    const IS_DELETE =   1,
        NOT_DELETE  =   0;

    const IS_ACTIVE =   1,
        DONE_ACTIVE =   2,
        NOT_ACTIVE  =   0;

    protected $table    =   'mini_limit_discount';

    protected $guarded  =   [];

    protected $dateFormat   =   'U';

    /**
     * 定义连接商品表
     * @return \Illuminate\Database\Eloquent\Relations\HasOne
     */
    public function good()
    {
        return $this->hasOne(ProductModel::class, 'id', 'good_id');
    }
}
